Skip to content

Expose return value of dispatch call via trackEvent#91

Open
jmif wants to merge 2 commits intonytimes:mainfrom
jmif:master
Open

Expose return value of dispatch call via trackEvent#91
jmif wants to merge 2 commits intonytimes:mainfrom
jmif:master

Conversation

@jmif
Copy link

@jmif jmif commented Sep 7, 2018

This allows us to receive the result of the dispatch function in trackEvent calls.

Main use case for this is waiting to execute code until the event has been successfully tracked. Our tracking method inside of dispatch() returns a promise that resolves when the event has been successfully tracked.

We can use this to delay execution of events (for example exiting link clicks on critical events) until the event has tracked.

@tizmagik
Copy link
Collaborator

tizmagik commented Sep 8, 2018

Nice. The use case makes sense 👍

Mind adding some docs and a test case please?

@jbadeau
Copy link

jbadeau commented Sep 24, 2018

Yes, some documentation would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants